package com.design.pattern.decorator;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * @author goujian
 * @description: 抽象装饰类
 * @date 2022/3/15 6:11 下午
 */
@Slf4j
@Data
public abstract class AbstractDecorator extends AbstractVehicle{
    protected AbstractVehicle vehicle;

    public AbstractDecorator(AbstractVehicle vehicle) {
        this.vehicle = vehicle;
    }

    @Override
    void basicFunction() {
        this.vehicle.basicFunction();
    }

    @Override
    void cost() {
        this.vehicle.cost();
    }
}
